<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 数组合并且去重
        function cancelArray(arr1,arr2){
            const arr=[];
            for(var i=0;i<arr1.length;i++){
                for(var j=0;j<arr2.length;j++){
                    if(arr1[i]===arr2[j]){
                        arr2.splice(j,1)
                    }
                }
            }
            arr.push(...arr1,...arr2)
            return arr
        }

        console.log(cancelArray([1,3,4,55],[3,5,1,55,66]));
    </script>
</body>
</html>